---
title: "SQL-VP-024: Retrieve team-assignment roster for a policy"
summary: Retrieves the team-member assignment roster for a policy via the Oracle view-policy package.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# SQL-VP-024 Retrieve team-assignment roster for a policy

The primary retrieval path for `clsTeamAssignmentCollection`. The `Criteria.MaskData` flag consumed
by `Fill` drives demo-user masking of team-member contact fields (see
[BR-VP-012](../business-rules.md#br-vp-012-team-assignment-masking-preserves-real-username-for-authorization)).

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-VP-024 |
| **Operation type** | Read |
| **Execution method** | Stored procedure |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | StoredProcedure |
| **Business object** | `clsTeamAssignmentCollection` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve` / `AfterRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `apolicynum` | Input | Decimal | N/A | Policy number to retrieve the team roster for. |
| `recordset` | Output (Cursor) | REF CURSOR | N/A | Result set containing team-assignment rows; `Criteria.MaskData` flag drives demo masking in `Fill`. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| *(not directly visible — encapsulated in procedure body)* | SELECT | N/A |

## Sample SQL

```sql
BEGIN
  pk72846_view_policy.team_assign_query(
    apolicynum => :apolicynum,
    recordset  => :recordset
  );
END;
```

*Call signature reconstructed from `DataRequest.SQLStatement`/`AddParm`/`AddCursorParm` calls; the
procedure body resides in the Oracle database and was not retrieved this run.*

## Business rules
- [BR-VP-008: Loss-control consultant assignment match required](../business-rules.md#br-vp-008-loss-control-consultant-assignment-match-required)
- [BR-VP-012: Team-assignment masking preserves real username for authorization](../business-rules.md#br-vp-012-team-assignment-masking-preserves-real-username-for-authorization)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Business.View.Policy\clsTeamAssignmentCollection.vb`
